# 李志毅='帅'
# print(李志毅)

# print('我是中央财经大学学生')
# print("我是中央财经大学学生")
# print('''我是中央财经大学学生''')
# print("""我是中央财经大学学生""")

# s1 = '我是中央财经大学学生'
# s2 = '我们住在沙河'
# print(s1, s2)
# print('s1', 's2')

# num1=input('第一个数字：')
# num2=input('第二个数字：')
# print(int(num1)+int(num2))

# who = input('你是谁')
# if who == '欧阳克':
#     print('滚蛋')
#     print('吓死我了！')
# elif who == '郭靖':
#     print('靖哥哥')
#     print('请进来！')
# elif who == '郭靖':
#     print('爹')
#     print('请进来！')
# print('这是第11行')

# num = 90
# user_num = input('请输入一个数字：')
# user_num = int(user_num)
# if user_num > num:
#     print('你输入的数字大了')
# elif user_num < num:
#     print('你输入的数字小了')
# else:
#     print('恭喜你，输入对了')

# while True:
#     print("can you forgive me?:")
#     s=input()
#     if s=='yes':
#         break
# print('ok')

# b2 = False
# print(b2, type(b2))

# a1 = 1
# a2 = bool(a1)
# print(a1, a2, type(a2))
#
# a1 = 0
# a2 = bool(a1)
# print(a1, a2, type(a2))
#
# a1 = -1
# a2 = bool(a1)
# print(a1, a2, type(a2))
#
# a1 = ''
# a2 = bool(a1)
# print(a1, a2, type(a2))
#
# a1 = ' '
# a2 = bool(a1)
# print(a1, a2, type(a2))
#
# a1 = '0'
# a2 = bool(a1)
# print(a1, a2, type(a2))
# s1 = '李白'
# print(s1)
# print(type(s1))
#
# s1 = "李白"
# print(s1)
# print(type(s1))
#
# s1 = '''李白'''
# print(s1)
# print(type(s1))
#
# s1 = """李白"""
# print(s1)
# print(type(s1))
#
# s1 = """床前明月光，疑是地上霜
# 床前明月光，疑是地上霜
# 床前明月光，疑是地上霜
# 床前明月光，疑是地上霜
# 床前明月光，疑是地上霜
# 床前明月光，疑是地上霜"""
# print(s1)
# print(type(s1))

# a1 = False
# s1 = str(a1)
# print(s1, type(s1))

# s1 = '中央财经大学'
# s2 = '财政税务学院'
# s3 = s1 + s2
# print(s3)

# s1 = '  libai and dufu and wangwei  '
# s2 = s1.strip()
# s3 = s1.lstrip()
# s4 = s1.rstrip()
# print('|{}|'.format(s1))
# print('|{}|'.format(s2))
# print('|{}|'.format(s3))
# print('|{}|'.format(s4))

# s1 = 'libai and dufu and wangwei and dufu and dufu'
# s2 = s1.replace('dufu', '杜甫')
# print(s2)

# lst1 = ['李白', '杜甫', '白居易', '王维', '孟浩然', '王昌龄', '杜牧', '韩愈']
# print(lst1[0])
# print(lst1[1])
# print(lst1[2])
#
# print(lst1[-1])
# print(lst1[-2])
# print(lst1[-3])
#
# print(lst1[100])

# lst1 = ['李白', '杜甫', '王维', '白居易', '李商隐']
# del lst1[1]
# print(lst1[1])
# dic = {'静夜思': '李白', '登高': '杜甫'}
# print(dic)
# print(type(dic))

# dic = {'静夜思': '李白', '登高': '杜甫', '长恨歌': '白居易'}
# data = dic['无题']
# print(data)

# dic = {'静夜思': '李白', '登高': '杜甫', '长恨歌': '白居易'}
# num = len(dic)
# lst1 = ['李白', '杜甫', '王维', '白居易', '李商隐']
# print(len(lst1))

# dic = {'静夜思': '李白', '登高': '杜甫', '长恨歌': '白居易'}
# a = dic.items()
# print(a)
# b = list(dic.items())
# print(b)
# for  key,value in dic.items():
#     print(key,value)
#
# print('这是模块：{}，对应的__name__：{}'.format('test1.py', __name__))
# if __name__ == '__main__':
#     print('我是test1.py的if语句代码块，你能看得见我吗？')

# import os
# s1 = '中央财经大学'
# lst1 = [1, 2, 3]
# # print(dir())
# print(os)

# import time
# print('打印文本1')
# time.sleep(3)
# print('打印文本2')

# import time
# import random
# num = random.randint(1, 5)
# print('等待{}秒'.format(num))
# time.sleep(num)
# print('打印文本2')

# import os
# print(os)
# path=os
# path = os.getcwd()
# pat=dir()
# print(path)

# import os
# path = os.path.splitext(__file__)
# print(path)

# import os
# path = os.path.join(r'C:\Users\315\Desktop\Python', 'venv')
# print(path)
# path = os.path.join(r'C:\Users\315\Desktop\Python', 'venv', 'Lib', 'map.py')
# print(path)

# import os
# path = os.listdir('C:\Program Files (x86)')
# print(path)

# txt = '杜甫'
# with open('python_test.txt', mode='w', encoding='utf-8') as fb:
#     fb.write('杜甫')
#
# def my_day(tv, game, study):
#     happy_1 = 1.5 * tv  # '看电视'
#     happy_2 = 2 * game  # '玩游戏'
#     happy_3 = 3.5 * study  # '学习'
#     happy_total = happy_1 + happy_2 + happy_3
#     return happy_total
#
# ret = my_day(2, 1, 6)
# print('今天的快乐值是：{}'.format(ret))
import requests
from bs4 import BeautifulSoup


header = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'
}
# url = 'https://ldj-bj-data-tuadryqw.oss-cn-beijing.aliyuncs.com/web/article/tbudwqeb/3.html'
url = 'https://note.youdao.com/?keyfrom=ydoc'
response = requests.get(url, headers=header)
response.encoding = 'utf-8'
soup = BeautifulSoup(response.text, 'html.parser')

# print(soup.head)
# print(type(soup.head))
# print(soup.head.title)
# print(type(soup.head.title))
# print(soup.body.div)
# print(soup.body.div.a)
# print(soup.a)

# print(soup.div.name)
# print(soup.div.attrs)
# print(type(soup.div.attrs))
# dict=soup.div.attrs
data = soup.div.contents
print(data)
# print(type(data))
# print(len(data))
# for content in data:
#     print('-' * 50)
#     print(content)